<?php

namespace app\modules\v1\controllers;


use app\modules\v1\components\BaseController;
use common\libraries\WechatAccount;
use Yii;

/**
 * Class ApiController
 * @package app\modules\v1\controllers
 */
class ApiController extends BaseController
{

    /**
     *获取AccessToken
     */
    public function actionGetAccessToken()
    {
        $accessToken = WechatAccount::getAccessToken();

        $data = new \stdClass();
        $data->accessToken = $accessToken;

        $this->success($data);
    }
}
